package mcu.market.net;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;

import mcu.market.ibatis.IBatisFactory;
import mcu.market.ibatis.bean.BeanCompany;
import mcu.market.ibatis.bean.BeanDailyPrice;
import mcu.market.util.DateUtil;

import org.apache.http.Consts;
import org.apache.http.HttpResponse;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.fluent.Form;
import org.apache.http.client.fluent.Request;
import org.apache.http.util.EntityUtils;
import org.apache.ibatis.exceptions.IbatisException;
import org.apache.ibatis.session.SqlSession;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Node;




/**
 * @author angle
 *	取資料
 *
 */
public class intDailyPrice {
	public static void main(String[] args) throws IOException {
		long time1, time2;
        time1 = System.currentTimeMillis();     
        
        getCompany getc= new getCompany();
        getc.execute();
        getIPOPrice ipo= new getIPOPrice();
        ipo.execute();
        getOTCPrice otc= new getOTCPrice();
		otc.execute();
        time2 = System.currentTimeMillis();
        System.out.println("取資料()花了：" + (time2-time1)/1000 + "秒");
		
		/*DBDosComand cmd=new DBDosComand();
		cmd.exec(cmd.DBToCSVCmds());*/
	}
	
}
/*private static Request Addhead(Request rt) {
rt.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Accept", "*//*")
.setHeader("Accept-Encoding", "gzip,deflate,sdch")
.addHeader("Accept-Language", "zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4")
.addHeader("Accept-Charset","Big5,utf-8;q=0.7,*;q=0.3");
return rt;
}*/
/*
	POST /mops/web/ajax_t51sb01 HTTP/1.1
	Host: mops.twse.com.tw
	Connection: keep-alive
	Content-Length: 53
	Origin: http://mops.twse.com.tw
	User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
	Content-Type: application/x-www-form-urlencoded
	Accept: * /*
	Referer: http://mops.twse.com.tw/mops/web/t51sb01
	Accept-Encoding: gzip,deflate,sdch
	Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4
	Accept-Charset: Big5,utf-8;q=0.7,*;q=0.3
	Cookie: jcsession=jHttpSession@191e365; __utma=193825960.1490894519.1380006299.1380008506.1380295135.3; 
		__utmb=193825960.1.10.1380295135; __utmc=193825960;
		 __utmz=193825960.1380295135.3.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); 
		newmops2=selfObj%3DtagCon1%7CTYPEK%3Dsii%7Ccode%3D%7C*/

 
